// LC0001-黎锦坪.cpp 
//提交：https://leetcode.cn/problems/two-sum
//难度：简单

#include <iostream>
#include <vector>
using namespace std;

    class Solution {
    public:
        vector<int> twoSum(vector<int>& nums, int target) {
            int n = nums.size();
            for (int i = 0; i < n; ++i) {
                for (int j = i + 1; j < n; ++j) {
                    if (nums[i] + nums[j] == target) {
                        return{ i, j };
                    }
                }
            }
            return {};
        }
    };

